load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library", "buck_java_test")
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("android_devxx")

source_listing()

buck_java_library(
    name = "testutil",
    srcs = glob(
        ["*.java"],
        exclude = ["*Test.java"],
    ),
    visibility = [
        "prelude//toolchains/android/test/...",
    ],
    deps = [
        "prelude//toolchains/android/third-party:guava",
        "prelude//toolchains/android/third-party:jsr305",
    ],
    exported_deps = [
        "prelude//toolchains/android/src/com/facebook/buck/android/aapt:r_dot_txt",
    ],
)

buck_java_test(
    name = "aapt",
    srcs = glob(["*Test.java"]),
    deps = [
        "prelude//toolchains/android/src/com/facebook/buck/android/aapt:mini_aapt",
        "prelude//toolchains/android/src/com/facebook/buck/io/filesystem/impl:utils",
        "prelude//toolchains/android/test/com/facebook/buck/testutil:testutil",
        "prelude//toolchains/android/third-party:guava",
        "prelude//toolchains/android/third-party:junit",
        ":testutil",
    ],
)
